<?php
//------------------------------------------------------------------------------
// File               : V_HotroEdit
// Modification       :
//------------------------------------------------------------------------------
// Date(yyyy.mm.dd)   Developer                       Action
//------------------------------------------------------------------------------
// 2007.03.09         Oanhhtk                         Created
//------------------------------------------------------------------------------
?>
<?php
include("../fckeditor/fckeditor.php") ;

function V_HotroEdit(&$arrayData,$mode){
	global $arrayError;
	$fqa=CM_getParameter("fqa");
	$ulr = "?".MODUL."=hotro&fqa=".$fqa."&".ACTION."=".$mode;//htmlspecialchars($_SERVER['QUERY_STRING']);
	
	$strButtonLabel ="Ghi lại";
	$strLabel ="Sửa thông tin người hỗ trợ khách hàng";
   
	if ($mode == "Add"){
		$strButtonLabel ="Thêm mới";	
		$strLabel ="Thêm mới thông tin người hỗ trợ khách hàng";
	}	
    $strHienThi1 = 'checked="checked"';
	$strHienThi0 = '';
	if($arrayData["hien_thi"]==0 && $mode!="Add"){
		$strHienThi1 = '';
		$strHienThi0 = 'checked="checked"';
	}

?>

<script language=javascript>

function validateForm() {
	if(document.f.ten.value==""){
		alert("Tên người hỗ trợ không được rỗng");
		document.f.ten.focus();
		return false;
	}
  
	 if(document.f.yahoo_id.value==""){
		alert("Nick yahoo không được rỗng");
		document.f.yahoo_id.focus();
		return false;
	}
	if(document.f.dt_di_dong.value==""){
		alert("Mobile không được rỗng");
		document.f.dt_di_dong.focus();
		return false;
	}
	return true;
}

function Focus(){
	document.f.ten.focus();
}


 

</script>
			<?= CM_showError() ?>
<body onLoad="Focus();">
<table border="1" width="100%" align="center" cellpadding="3" cellspacing="0" bordercolor="#FF9900" bordercolordark="white">
<tbody>
<form enctype="multipart/form-data" action="<?=$ulr?>" method="post" name="f" onsubmit="return validateForm();">
<input type="hidden" name="id" value="<?=htmlspecialchars($arrayData["id"])?>" />
<input type="hidden" name="fqa" value="<?=htmlspecialchars($arrayData["fqa"])?>" />
				<tr>
				  <td colspan="2" bgcolor="#FFE59F" align="center"  class=bk12-140 ><font size="3"><strong><?=$strLabel;?></strong></font>
				  </td>
			  </tr>
				<tr>
			  		<td  width="19%" bgcolor="#FFE59F"  class=bk12-140 ><font color="#000099" size="2" face="Verdana, Arial, Helvetica, sans-serif">Tên người hỗ trợ: </font><span style="color:#FF0000;">*</span></td>
					<td colspan="2" width="81%">
			  			<font size="2" face="Verdana, Arial, Helvetica, sans-serif">
			  			<input name="ten" type="text" value="<?=htmlspecialchars($arrayData["ten"])?>" size="50" maxlength="100" /> 
			  			</font>
			  		</td>
				</tr>
				
				<tr>
			  		<td  width="19%" bgcolor="#FFE59F"  class=bk12-140 ><font color="#000099" size="2" face="Verdana, Arial, Helvetica, sans-serif">Lĩnh vực hỗ trợ: </font><span style="color:#FF0000;">*</span></td>
					<td colspan="2" width="81%">
			  			<font size="2" face="Verdana, Arial, Helvetica, sans-serif">
						<?
							if($arrayData['linh_vuc_ho_tro']==0){
								$selected0 = "selected";
							}else{
								$selected0 = "";
							}
							if($arrayData['linh_vuc_ho_tro']==1){
								$selected1 = "selected";
							}else{
								$selected1 = "";
							}
							if($arrayData['linh_vuc_ho_tro']==2){
								$selected2 = "selected";
							}else{
								$selected2 = "";
							}
						?>
			  			<select name="linh_vuc_ho_tro" style="WIDTH: 200px" >
							<option value="0" <?=$selected0?>>Kỹ thuật</option>
							<option value="1" <?=$selected1?>>Kinh doanh phân phối</option>
							<option value="2" <?=$selected2?>>Bảo hành</option>
						</select>
			  			</font>
			  		</td>
				</tr>
				 <tr>
				  <td  bgcolor="#FFE59F"  ><font color="#000099" size="2" face="Verdana, Arial, Helvetica, sans-serif">Hi&#7875;n th&#7883;:</font></td>
				  <td ><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><span class="style1">
				 
				  </span>
					  <label>
					  <input name="hien_thi" type="radio" value="1" <?=$strHienThi1?> />
		C&oacute;</label>
					  <label>
					  <input name="hien_thi" type="radio" value="0" <?=$strHienThi0 ?> />
		Kh&ocirc;ng</label>
				  </font> </td>
				</tr>
				<tr>
			  		<td  width="19%" bgcolor="#FFE59F"  class=bk12-140 ><font color="#000099" size="2" face="Verdana, Arial, Helvetica, sans-serif">Nick yahoo: </font><span style="color:#FF0000;">*</span></td>
					<td colspan="2" width="81%">
			  			<font size="2" face="Verdana, Arial, Helvetica, sans-serif">
			  			<input name="yahoo_id" type="text" value="<?=htmlspecialchars($arrayData["yahoo_id"])?>" size="50" maxlength="100" /> 
			  			</font>
			  		</td>
				</tr>
				
				
				
			<tr>
				<td  width="19%" bgcolor="#FFE59F"  class=bk12-140>
					<font color="#000099" size="2" face="Verdana, Arial, Helvetica, sans-serif">Điện thoại: </font>
				</td>
				<td>
					<input name="dt_co_dinh" type="text" size="50" value="<?=htmlspecialchars($arrayData["dt_co_dinh"])?>" />
				</td>
			</tr>
					  
			 <tr>
				<td  width="19%" bgcolor="#FFE59F"  class=bk12-140>
					<font color="#000099" size="2" face="Verdana, Arial, Helvetica, sans-serif">Mobile: </font><span style="color:#FF0000;">*</span>
				</td>
				<td>
					<input name="dt_di_dong" type="text" size="50" value="<?=htmlspecialchars($arrayData["dt_di_dong"])?>" />
				</td>
			</tr>
				
				
				
				
				
				

							<script language = 'JavaScript' >
							function backToList(){
								location = '<?="?".MODUL."=hotro&".ACTION."="."List"?>';
								return;
							}
							</script>
				<tr>
					<td colspan="2" align="center">
						<input name="Reset" type="reset" value=" Nhập lại " />
						<input name="Submit" type="submit" value="<?=$strButtonLabel?>" />
						<input type="button" name="back" value="Trở lại"
						onClick="javascript: return backToList();">
					</td>
				</tr>
</form>
</tbody>
</table>
</body>

<?php
}
?>
